package service;

import java.io.Serializable;

public class User implements Serializable{
   /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
private int id;
   private String uname;
   private String upwd;
   private int role;
public int getId() {
	return id;
}
public void setId(int id) {
	this.id = id;
}
public String getUname() {
	return uname;
}
public void setUname(String uname) {
	this.uname = uname;
}
public String getUpwd() {
	return upwd;
}
public void setUpwd(String upwd) {
	this.upwd = upwd;
}
public int getRole() {
	return role;
}
public void setRole(int role) {
	this.role = role;
}
@Override
public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + id;
	result = prime * result + role;
	result = prime * result + ((uname == null) ? 0 : uname.hashCode());
	result = prime * result + ((upwd == null) ? 0 : upwd.hashCode());
	return result;
}
@Override
public boolean equals(Object obj) {
	if (this == obj)
		return true;
	if (obj == null)
		return false;
	if (getClass() != obj.getClass())
		return false;
	User other = (User) obj;
	if (id != other.id)
		return false;
	if (role != other.role)
		return false;
	if (uname == null) {
		if (other.uname != null)
			return false;
	} else if (!uname.equals(other.uname))
		return false;
	if (upwd == null) {
		if (other.upwd != null)
			return false;
	} else if (!upwd.equals(other.upwd))
		return false;
	return true;
}
public User(int id, String uname, String upwd, int role) {
	super();
	this.id = id;
	this.uname = uname;
	this.upwd = upwd;
	this.role = role;
}
public User() {
	super();
}
@Override
public String toString() {
	return "User [id=" + id + ", role=" + role + ", uname=" + uname + ", upwd="
			+ upwd + "]";
}
   
}
